/*=========================================================================
| KCardDAV
|--------------------------------------------------------------------------
| (c) 2010  Kumaran Santhanam
|
| This project is released under the GNU General Public License.
| Please see the file COPYING for more details.
|--------------------------------------------------------------------------
| Upload job class.
 ========================================================================*/

/*=========================================================================
| INCLUDES
 ========================================================================*/

#ifndef KCARDDAV_UPLOAD_JOB_H
#define KCARDDAV_UPLOAD_JOB_H

#include "job.h"

//forward declarations
namespace KABC { class AddresseeList; }

namespace KABC { namespace carddav {

/*=========================================================================
| CLASS
 ========================================================================*/

class UploadJob : public Job {
    Q_OBJECT
public:
    UploadJob(const QUrl& url,
              const AddresseeList& added,
              const AddresseeList& changed,
              const AddresseeList& deleted
              );
    virtual ~UploadJob();

private:
    virtual ne_request* createRequest(ne_session* session);
    virtual bool requestAgain();
    virtual void blockRead(const char *buf, size_t len);
    virtual void requestFinished();
    virtual void jobFinished(ResourceCardDav* customer);

    DECLARE_PIMPL(UploadJob)
};

}} // namespaces

#endif

